set(CMAKE_CROSSCOMPILING TRUE)
#set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(OHOS_SRC_HOME /home/ohos/openHarmony/OH3_2B)
set(OHOS_TOOLCHAIN ${OHOS_SRC_HOME}/prebuilts/clang/ohos/linux-x86_64/llvm/bin)
set(OHOS_SYSROOT ${OHOS_SRC_HOME}/out/rk3568/obj/third_party/musl)
set(CMAKE_C_COMPILER ${OHOS_TOOLCHAIN}/clang)
set(CMAKE_CXX_COMPILER ${OHOS_TOOLCHAIN}/clang++)
#set(CMAKE_TOOLCHAIN_PREFIX llvm-)
#SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
set(CMAKE_C_FLAGS "--sysroot=${OHOS_SYSROOT} -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 --target=aarch64-linux-ohos")
set(CMAKE_CXX_FLAGS "--sysroot=${OHOS_SYSROOT} -fvisibility-inlines-hidden -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 --target=aarch64-linux-ohos")
set(MY_LINK_FLAGS "--target=arm-linux-ohosmusl --sysroot=${OHOS_SYSROOT}")
set(CMAKE_CXX_LINKER ${OHOS_TOOLCHAIN}/clang++)
set(CMAKE_C_LINKER ${OHOS_TOOLCHAIN}/clang)
set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINKER} ${MY_LINK_FLAGS} <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINKER} ${MY_LINK_FLAGS} <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_FIND_USE_PACKAGE_ROOT_PATH FALSE)
set(CMAKE_FIND_USE_CMAKE_PATH FALSE)
set(CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH FALSE)
#set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH FALSE)
set(CMAKE_FIND_USE_PACKAGE_REGISTRY FALSE)
#set(CMAKE_FIND_USE__PATH FALSE)
#ET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/thirdparty_lib)
#ET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/thirdparty_bin)
#et(CMAKE_INSTALL_PREFIX ${OHOS_SRC_HOME}/out/rk3568/zip/zip)
#nclude_directories(${CMAKE_INSTALL_PREFIX}/include)
#ist(APPEND CMAKE_PREFIX_PATH  "${CMAKE_INSTALL_PREFIX}/include")
#ist(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}/lib")
